package com.hfi.ood.litejunit.v1.biz;

/**
 * @author ChangLiang
 * @date 2020/5/25
 */
public class Calculator {

    private int result = 0;

    public void add(int x) {
        result += x;
    }

    public void subtract(int x) {
        result -= x;
    }

    public int getResult() {
        return this.result;
    }

    /**
     * 程序员使用的测试用例
     */
    public static void main(String[] args) {
        Calculator calculator = new Calculator();
        calculator.add(10);
        calculator.subtract(5);
        System.out.println(calculator.getResult());
    }
}
